#!/bin/bash

deploy_jellyfin() {
  docker run -d --name jellyfin --restart=always \
   -p 8096:8096 \
   -v /opt/jellyfin/config:/config \
   -v /opt/jellyfin/cache:/cache \
   -v /Volumes/186XXXX1781/影视区/迅雷下载:/media \
   --restart=unless-stopped \
   jellyfin/jellyfin
}

deploy_metatube() {
  mkdir -p /opt/metatube/config
  docker rm -f metatube

  docker run -d -p 18085:8080 -v /opt/metatube/config:/config --name metatube \
    ghcr.io/metatube-community/metatube-server:latest -dsn /config/metatube.db
}

other() {
  mkdir -p /Volumes/nas/opt/jellyfin/config
  mkdir -p /Volumes/nas/opt/jellyfin/cache
  mkdir -p /Volumes/nas/opt/jellyfin/media

  docker rm -f jellyfin

  admin/Lfq@2025
}

#deploy_jellyfin
deploy_metatube